import Vue from "vue";
import App from "./App.vue";
import "./main.css";
import router from "./router";
import store from "./store";
import "@/assets/css/app.scss";
import "normalize.css";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
// import animated from "animate.css";
import api from "./api";
import RichText from "../plugins/richtext";
import * as echarts from "echarts";
import "quill/dist/quill.core.css"; // quill的核心样式
import "quill/dist/quill.snow.css"; // quill的snow主题样式

import VueScroller from "vue-scroller";
Vue.use(VueScroller);

Vue.use(RichText);

// 引入echarts

Vue.prototype.$echarts = echarts;
var dayjs = require("dayjs");
Vue.prototype.dayjs = dayjs;
// Vue.prototype.$getMenuTree = getMenuTree;
Vue.prototype.$api = api;
// Vue.use(animated);
// Vue.use(tailwindcss);
// import { Form, FormItem } from "element-ui";
Vue.use(ElementUI);
// Vue.use(Form);
// Vue.use(FormItem);
Vue.filter("dateChage", function (time) {
  //1.对拿到的time进行格式化处理，得到YYYY-MM-DD HH:mm:ss
  //2. 把格式化结果，return
  //直接调用dayjs()得到的是当前时间
  //dayjs(给定的时间)得到的是指定时间
  const dt = dayjs(time).format("YYYY-MM-DD HH:mm:ss");
  return dt;
}),
  (Vue.config.productionTip = false);

new Vue({
  mode: "history",
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
